Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Oct 25, 2025

Added fast paths to hot methods and all property change listeners which are active during the "opening projects" phase.

Avoid calling findFileObject() or using the Lookup in event handlers if possible.

NewFile (action): remove PropertyChangeListener since the refresh() which was called from the handler method isn't doing much anymore beside locking.

(The event handlers were called almost 1.5m times during the second project group which is why fast paths make such a difference there)

results:

speeds up post-launch "opening projects" phase by up to 30% when big project groups are loaded without making the code more complex (I tried also other tricks but they weren't worth their complexity).

loadInBackground() timings:

for 40 maven projects:

before: 7806
after: 6033

for 850 NetBeans ant projects:

before: 32476
after: 21462

no flame graphs this time since I overwrote the baseline graph by accident

@mbien mbien added this to the NB29 milestone Oct 25, 2025
@mbien
Copy link
Member Author

mbien commented Nov 10, 2025

planning to merge this soon now that the release is done. But will take another good look through it first.

added fast paths to hot methods and all property change listeners which
are active during the "opening projects" phase

avoid calling findFileObject() or using the lookup in event handlers
if possible

NewFile (action): remove PropertyChangeListener since the refresh()
method isn't doing much anymore beside locking.

speeds up post-launch "opening projects" phase by up to 30% when big
project groups are loaded
@mbien mbien force-pushed the open-projects-performance branch from 6e41a88 to e458f06 Compare November 12, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant